<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
<meta name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

    <meta name="author" content="Ian Tang">


    <meta name="subtitle" content="岁月不居时节如流">


    <meta name="description" content="好记性不如烂笔头">



<title>使用devstack（pike）部署openstack | 随笔</title>



    <link rel="icon" href="/image/The_Lion_King_32_32.png">




    <!-- stylesheets list from _config.yml -->
    
    <link rel="stylesheet" href="/css/style.css">
    



    <!-- scripts list from _config.yml -->
    
    <script src="/js/script.js"></script>
    
    <script src="/js/tocbot.min.js"></script>
    



    
    
        
    


<meta name="generator" content="Hexo 6.3.0"></head>

<body>
    <script>
        // this function is used to check current theme before page loaded.
        (() => {
            const currentTheme = window.localStorage && window.localStorage.getItem('theme') || '';
            const isDark = currentTheme === 'dark';
            const pagebody = document.getElementsByTagName('body')[0]
            if (isDark) {
                pagebody.classList.add('dark-theme');
                // mobile
                document.getElementById("mobile-toggle-theme").innerText = "· Dark"
            } else {
                pagebody.classList.remove('dark-theme');
                // mobile
                document.getElementById("mobile-toggle-theme").innerText = "· Light"
            }
        })();
    </script>

    <div class="wrapper">
        <header>
    <nav class="navbar">
        <div class="container">
            <div class="navbar-header header-logo"><a href="/">Tangkaifei&#39;s Blog</a></div>
            <div class="menu navbar-right">
                
                    <a class="menu-item" href="/archives">Posts</a>
                
                    <a class="menu-item" href="/category">Categories</a>
                
                    <a class="menu-item" href="/tag">Tags</a>
                
                    <a class="menu-item" href="/about">About</a>
                
                <input id="switch_default" type="checkbox" class="switch_default">
                <label for="switch_default" class="toggleBtn"></label>
            </div>
        </div>
    </nav>

    
    <nav class="navbar-mobile" id="nav-mobile">
        <div class="container">
            <div class="navbar-header">
                <div>
                    <a href="/">Tangkaifei&#39;s Blog</a><a id="mobile-toggle-theme">·&nbsp;Light</a>
                </div>
                <div class="menu-toggle" onclick="mobileBtn()">&#9776; Menu</div>
            </div>
            <div class="menu" id="mobile-menu">
                
                    <a class="menu-item" href="/archives">Posts</a>
                
                    <a class="menu-item" href="/category">Categories</a>
                
                    <a class="menu-item" href="/tag">Tags</a>
                
                    <a class="menu-item" href="/about">About</a>
                
            </div>
        </div>
    </nav>

</header>
<script>
    var mobileBtn = function f() {
        var toggleMenu = document.getElementsByClassName("menu-toggle")[0];
        var mobileMenu = document.getElementById("mobile-menu");
        if(toggleMenu.classList.contains("active")){
           toggleMenu.classList.remove("active")
            mobileMenu.classList.remove("active")
        }else{
            toggleMenu.classList.add("active")
            mobileMenu.classList.add("active")
        }
    }
</script>
            <div class="main">
                <div class="container">
    
    
        <div class="post-toc">
    <div class="tocbot-list">
    </div>
    <div class="tocbot-list-menu">
        <a class="tocbot-toc-expand" onclick="expand_toc()">Expand all</a>
        <a onclick="go_top()">Back to top</a>
        <a onclick="go_bottom()">Go to bottom</a>
    </div>
</div>

<script>
    var tocbot_timer;
    var DEPTH_MAX = 6; // 为 6 时展开所有
    var tocbot_default_config = {
        tocSelector: '.tocbot-list',
        contentSelector: '.post-content',
        headingSelector: 'h1, h2, h3, h4, h5',
        orderedList: false,
        scrollSmooth: true,
        onClick: extend_click,
    };

    function extend_click() {
        clearTimeout(tocbot_timer);
        tocbot_timer = setTimeout(function() {
            tocbot.refresh(obj_merge(tocbot_default_config, {
                hasInnerContainers: true
            }));
        }, 420); // 这个值是由 tocbot 源码里定义的 scrollSmoothDuration 得来的
    }

    document.ready(function() {
        tocbot.init(obj_merge(tocbot_default_config, {
            collapseDepth: 1
        }));
    });

    function expand_toc() {
        var b = document.querySelector('.tocbot-toc-expand');
        var expanded = b.getAttribute('data-expanded');
        expanded ? b.removeAttribute('data-expanded') : b.setAttribute('data-expanded', true);
        tocbot.refresh(obj_merge(tocbot_default_config, {
            collapseDepth: expanded ? 1 : DEPTH_MAX
        }));
        b.innerText = expanded ? 'Expand all' : 'Collapse all';
    }

    function go_top() {
        window.scrollTo(0, 0);
    }

    function go_bottom() {
        window.scrollTo(0, document.body.scrollHeight);
    }

    function obj_merge(target, source) {
        for (var item in source) {
            if (source.hasOwnProperty(item)) {
                target[item] = source[item];
            }
        }
        return target;
    }
</script>
    

    
    <article class="post-wrap">
        <header class="post-header">
            <h1 class="post-title">使用devstack（pike）部署openstack</h1>
            
                <div class="post-meta">
                    
                        Author: <a itemprop="author" rel="author" href="/">Ian Tang</a>
                    

                    
                        <span class="post-time">
                        Date: <a href="#">十一月 27, 2022&nbsp;&nbsp;12:00:00</a>
                        </span>
                    
                    
                        <span class="post-category">
                    Category:
                            
                                <a href="/categories/%E6%96%B9%E6%B3%95%EF%BC%9A%E6%96%B9%E6%B3%95%E8%AE%BA%EF%BC%88%E7%BB%8F%E9%AA%8C%E8%B0%88%EF%BC%89/">方法：方法论（经验谈）</a>
                            
                        </span>
                    
                </div>
            
        </header>

        <div class="post-content">
            <p>[toc]</p>
<h1 id="环境和工具"><a href="#环境和工具" class="headerlink" title="环境和工具"></a>环境和工具</h1><p>ubuntu16.04 + devstack（pike）</p>
<ul>
<li><p>更改apt&#x2F;或者yum源</p>
</li>
<li><p>更改pip源</p>
</li>
<li><p>提前下载好glance、neutron、nova、keystone、cinder等镜像，放在files文件夹下</p>
</li>
<li><p>git clone devstack</p>
</li>
<li><p>创建stack用户，赋予用户权限</p>
</li>
<li><p>.&#x2F;stack.sh 安装不成功.&#x2F;unstack.sh .&#x2F;clean.sh</p>
<p><strong><font color=yellow>the most beautiful thing is not keep time but retain memories.</font></strong></p>
</li>
</ul>
<p>参考<a target="_blank" rel="noopener" href="http://www.chenshake.com/local-conf-devstack-profile-parameter-description/">陈沙克</a>大佬说明解释 Local.conf</p>
<h3 id="开始"><a href="#开始" class="headerlink" title="开始"></a>开始</h3><h3 id="修改git源"><a href="#修改git源" class="headerlink" title="修改git源"></a>修改git源</h3><p>默认Devstack会从github下载所有需要的代码，包括OpenStack。这其实是导致Devstack安装时间太长的一个重要原因。</p>
<p>目前 git.trystack.cn 提供OpenStack的所有github的mirror。对于Devstack来说，只需要在配置文件增加3行就可以。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">use TryStack git mirror</span></span><br><span class="line">GIT_BASE=http://git.trystack.cn</span><br><span class="line">NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git</span><br><span class="line">SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git</span><br></pre></td></tr></table></figure>

<h3 id="主机IP"><a href="#主机IP" class="headerlink" title="主机IP"></a>主机IP</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">HOST_IP=192.168.27.128</span><br></pre></td></tr></table></figure>

<h3 id="镜像下载"><a href="#镜像下载" class="headerlink" title="镜像下载"></a>镜像下载</h3><p>安装devstack的时候，默认会下载相应的镜像，这些镜像都在国外，我们可以指定连接来下载相关镜像。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Define images to be automatically downloaded during the DevStack built process.</span></span><br><span class="line">DOWNLOAD_DEFAULT_IMAGES=False</span><br><span class="line">IMAGE_URLS=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img</span><br></pre></td></tr></table></figure>

<h3 id="ipv4"><a href="#ipv4" class="headerlink" title="ipv4"></a>ipv4</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">only support IP v4</span></span><br><span class="line">SERVICE_IP_VERSION=4</span><br></pre></td></tr></table></figure>

<h3 id="keystone-版本"><a href="#keystone-版本" class="headerlink" title="keystone 版本"></a>keystone 版本</h3><p>现在默认就是支持keystone v3，除非你需要使用v2。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">only support keystone v2</span></span><br><span class="line">ENABLE_IDENTITY_V2=True</span><br></pre></td></tr></table></figure>

<h3 id="网络"><a href="#网络" class="headerlink" title="网络"></a>网络</h3><p>默认Devstack会创建一个网络，如果你不需要创建</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">not create default network</span></span><br><span class="line">NEUTRON_CREATE_INITIAL_NETWORKS=False</span><br></pre></td></tr></table></figure>

<p>我们也可以指定相关的网络</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">instead of default network</span></span><br><span class="line">FLOATING_RANGE=&quot;192.168.27.0/24&quot;</span><br><span class="line">FIXED_RANGE=&quot;10.0.0.0/24&quot;</span><br><span class="line">Q_FLOATING_ALLOCATION_POOL=start=192.168.27.102,end=192.168.27.110</span><br><span class="line">PUBLIC_NETWORK_GATEWAY=&quot;192.168.27.2&quot;</span><br></pre></td></tr></table></figure>

<h3 id="指定版本安装"><a href="#指定版本安装" class="headerlink" title="指定版本安装"></a>指定版本安装</h3><p>对于普通用户，想了解某个版本的功能，可以在配置文件指定版本</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Branches</span></span><br><span class="line">KEYSTONE_BRANCH=stable/liberty</span><br><span class="line">NOVA_BRANCH=stable/liberty</span><br><span class="line">NEUTRON_BRANCH=stable/liberty</span><br><span class="line">SWIFT_BRANCH=stable/liberty</span><br><span class="line">GLANCE_BRANCH=stable/liberty</span><br><span class="line">CINDER_BRANCH=stable/liberty</span><br></pre></td></tr></table></figure>

<p>我们使用的Devstack，也需要使用相同的版本，这样才能避免安装失败可能性。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone http://git.trystack.cn/openstack-dev/devstack -b stable/liberty</span><br></pre></td></tr></table></figure>

<p>默认大家都是使用devstack的master。</p>
<h3 id="Neutron"><a href="#Neutron" class="headerlink" title="Neutron"></a>Neutron</h3><p>这是最复杂的地方，目前devstack默认的网络还是nova network，所以你要采用Neutron，你必须</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Enabling Neutron (network) Service</span></span><br><span class="line">disable_service n-net</span><br><span class="line">enable_service q-svc</span><br><span class="line">enable_service q-agt</span><br><span class="line">enable_service q-dhcp</span><br><span class="line">enable_service q-l3</span><br><span class="line">enable_service q-meta</span><br><span class="line">enable_service q-metering</span><br><span class="line">enable_service neutron</span><br></pre></td></tr></table></figure>

<p>vlan模式</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">VLAN configuration.</span></span><br><span class="line">Q_PLUGIN=ml2</span><br><span class="line">ENABLE_TENANT_VLANS=True</span><br><span class="line">TENANT_VLAN_RANGE=1100:2999</span><br></pre></td></tr></table></figure>

<h3 id="离线安装"><a href="#离线安装" class="headerlink" title="离线安装"></a>离线安装</h3><p>当我们修改参数，重新运行devstack的时候，这个时候，你不希望重新下载git和操作系统的update</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Work offline</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">OFFLINE=True</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Reclone each time</span></span><br><span class="line">RECLONE=no</span><br></pre></td></tr></table></figure>

<h1 id="安装准备"><a href="#安装准备" class="headerlink" title="安装准备"></a>安装准备</h1><ol>
<li>apt更改国内源并更新</li>
<li>安装pip并升级</li>
<li>更改pip源地址为国内</li>
<li>安装git工具</li>
<li>安装Open vSwitch</li>
</ol>
<h1 id="下载源包"><a href="#下载源包" class="headerlink" title="下载源包"></a>下载源包</h1><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/openstack-dev/devstack.git</span><br></pre></td></tr></table></figure>

<p>目前Devstack脚本已经不支持直接使用root身份运行，你需要创建stack用户运行</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">cd /home/devstack/tools/</span><br><span class="line">./create-stack-user.sh</span><br></pre></td></tr></table></figure>

<p>修改devstack目录权限,让stack用户可以运行</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">chown -R stack:stack /home/devstack</span><br></pre></td></tr></table></figure>

<p>切换的stack用户下</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">su stack</span><br><span class="line">cd /home/devstack</span><br></pre></td></tr></table></figure>

<p>进入devstack目录下，创建local.conf 文件</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Misc</span></span><br><span class="line">DATABASE_PASSWORD=123456</span><br><span class="line">ADMIN_PASSWORD=123456</span><br><span class="line">SERVICE_PASSWORD=123456</span><br><span class="line">SERVICE_TOKEN=123456</span><br><span class="line">RABBIT_PASSWORD=123456</span><br><span class="line"><span class="meta prompt_"> </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Reclone each time</span></span><br><span class="line">RECLONE=true</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Python enviroments</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">OFFLINE=<span class="literal">true</span></span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># For Keystone</span></span></span><br><span class="line">KEYSTONE_TOKEN_FORMAT=PKI</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># For Swift</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">SWIFT_REPLICAS=1</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">SWIFT_HASH=011688b44136573e209e</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Enable Logging</span></span><br><span class="line">DEST=/home/stack</span><br><span class="line">LOGFILE=$DEST/logs/stack.sh.log</span><br><span class="line">VERBOSE=True</span><br><span class="line">LOG_COLOR=True</span><br><span class="line">SCREEN_LOGDIR=$DEST/logs</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Pre-requisite</span></span><br><span class="line">ENABLED_SERVICES=rabbit,mysql,key</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># If you want ZeroMQ instead of RabbitMQ (don&#x27;t forget to un-declare &#x27;rabbit&#x27; from the pre-requesite)</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ENABLED_SERVICES+=,-rabbit,-qpid,zeromq</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># If you want Qpid instead of RabbitMQ (don&#x27;t forget to un-declare &#x27;rabbit&#x27; from the pre-requesite)</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ENABLED_SERVICES+=,-rabbit,-zeromq,qpid</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Horizon (Dashboard UI) - (always use the trunk)</span></span><br><span class="line">ENABLED_SERVICES+=,horizon</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">HORIZON_REPO=https://github.com/openstack/horizon</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">HORIZON_BRANCH=master</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Nova - Compute Service</span></span><br><span class="line">ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-cauth</span><br><span class="line">IMAGE_URLS+=&quot;,https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img&quot;</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># Nova Cells</span></span></span><br><span class="line">ENABLED_SERVICES+=,n-cell</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Glance - Image Service</span></span><br><span class="line">ENABLED_SERVICES+=,g-api,g-reg</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Swift - Object Storage</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Neutron - Networking Service</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">If Neutron is not declared the old good nova-network will be used</span></span><br><span class="line">ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># Neutron - Load Balancing</span></span></span><br><span class="line">ENABLED_SERVICES+=,q-lbaas</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># Neutron - VPN as a Service</span></span></span><br><span class="line">ENABLED_SERVICES+=,q-vpn</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># Neutron - Firewall as a Service</span></span></span><br><span class="line">ENABLED_SERVICES+=,q-fwaas</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">VLAN configuration - LinuxBridge + VLAN模式</span></span><br><span class="line">Q_PLUGIN=linuxbridge</span><br><span class="line">ENABLE_TENANT_VLANS=True</span><br><span class="line">TENANT_VLAN_RANGE=1920:1930</span><br><span class="line">PHYSICAL_NETWORK=default</span><br><span class="line">LB_PHYSICAL_INTERFACE=eth0</span><br><span class="line"><span class="meta prompt_">  # </span><span class="language-bash">VLAN configuration - Open VSwitch + VLAN模式</span>  </span><br><span class="line"><span class="meta prompt_">  #</span><span class="language-bash">ENABLE_TENANT_VLANS=True</span></span><br><span class="line"><span class="meta prompt_">  #</span><span class="language-bash">TENANT_VLAN_RANGE=1920:1930</span></span><br><span class="line"><span class="meta prompt_">  #</span><span class="language-bash">PHYSICAL_NETWORK=default</span></span><br><span class="line"><span class="meta prompt_">  #</span><span class="language-bash">OVS_PHYSICAL_INTERFACE=eth0</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">GRE tunnel configuration</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">Q_PLUGIN=ml2</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ENABLE_TENANT_TUNNELS=True</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">VXLAN tunnel configuration</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">Q_PLUGIN=ml2</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">Q_ML2_TENANT_NETWORK_TYPE=vxlan</span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Cinder - Block Device Service</span></span><br><span class="line">ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Heat - Orchestration Service</span></span><br><span class="line">ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">IMAGE_URLS+=<span class="string">&quot;,http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2&quot;</span></span></span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Ceilometer - Metering Service (metering + alarming)</span></span><br><span class="line">CEILOMETER_BACKEND=mysql</span><br><span class="line">ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api</span><br><span class="line">ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval</span><br><span class="line"><span class="meta prompt_">  </span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Apache fronted <span class="keyword">for</span> WSGI</span></span><br><span class="line">APACHE_ENABLED_SERVICES+=keystone,swift</span><br></pre></td></tr></table></figure>

<h1 id="预防问题"><a href="#预防问题" class="headerlink" title="预防问题"></a>预防问题</h1><ol>
<li><p>手动下载各个组件的的包，解压至&#x2F;opt&#x2F;stack下并使用git工具初始化各个组件的仓库</p>
</li>
<li><p>手动下载requirement包，并手动安装依赖包</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install -r upper-requirement.txt</span><br></pre></td></tr></table></figure>
</li>
<li><p>一定要升级pip工具，如果遇到setuptools、get-pip.py之类的报错，基本就是pip安装与easy_install安装这两种python包管理工具的冲突，使用pip升级setuptool、disturb</p>
</li>
<li><p>安装过程中比较难下的还有etcd-v3.1.7，stestr等，都可以提前下好</p>
</li>
<li><p>如果报缺少openstack_auth，重写安装dajago_openstack_auth</p>
</li>
<li><p>缺少model_query，全局搜索_model_query，复制到&#x2F;usr&#x2F;local&#x2F;bin</p>
</li>
<li><p>要安装p4插件，提前下好heat、heat-dashboard、networking-sfc、networking-p4</p>
</li>
<li><p>p4的底层驱动behavioral-model里有一个bvm2.py的脚本，脚本里有一个在临时文件夹下下载thrift的命令，可以手动下载，同时脚本的thrift0.7.0版本貌似不兼容，下载thrift0.10.0可以运行</p>
</li>
<li><p>如果keystone日志报uwsgi没有启动，删除&#x2F;etc&#x2F;keystone&#x2F;***.ini脚本里plugins&#x3D;python</p>
</li>
<li><p>控制节点执行：nova-manage cell_v2 discover_hosts –verbose以发现计算节点</p>
</li>
</ol>

        </div>

        
            <section class="post-copyright">
                
                    <p class="copyright-item">
                        <span>Author:</span>
                        <span>Ian Tang</span>
                    </p>
                
                
                    <p class="copyright-item">
                        <span>Permalink:</span>
                        <span><a href="https://tkhfree.github.io/2022/11/27/%E4%BD%BF%E7%94%A8devstack%EF%BC%88pike%EF%BC%89%E9%83%A8%E7%BD%B2openstack-2022-11-27/">https://tkhfree.github.io/2022/11/27/%E4%BD%BF%E7%94%A8devstack%EF%BC%88pike%EF%BC%89%E9%83%A8%E7%BD%B2openstack-2022-11-27/</a></span>
                    </p>
                
                
                    <p class="copyright-item">
                        <span>License:</span>
                        <span>Copyright (c) 2019 <a target="_blank" rel="noopener" href="http://creativecommons.org/licenses/by-nc/4.0/">CC-BY-NC-4.0</a> LICENSE</span>
                    </p>
                
                
                     <p class="copyright-item">
                         <span>Slogan:</span>
                         <span>Do you believe in <strong>DESTINY</strong>?</span>
                     </p>
                

            </section>
        
        <section class="post-tags">
            <div>
                <span>Tag(s):</span>
                <span class="tag">
                    
                    
                        <a href="/tags/openstack/"># openstack</a>
                    
                        <a href="/tags/python/"># python</a>
                    
                        
                </span>
            </div>
            <div>
                <a href="javascript:window.history.back();">back</a>
                <span>· </span>
                <a href="/">home</a>
            </div>
        </section>
        <section class="post-nav">
            
                <a class="prev" rel="prev" href="/2022/11/27/bazel%E4%BB%8B%E7%BB%8D-2022-11-27/">bazel介绍</a>
            
            
            <a class="next" rel="next" href="/2022/11/27/web%E5%BC%80%E5%8F%91%E4%B8%AD%E6%97%A5%E5%BF%97%E4%BB%A3%E7%A0%81%E6%A6%82%E8%BF%B0-2022-11-27/">web开发中日志代码概述</a>
            
        </section>


    </article>
</div>

            </div>
            <footer id="footer" class="footer">
    <div class="copyright">
        <span>© Ian Tang | Powered by <a href="https://hexo.io" target="_blank">Hexo</a> & <a href="https://github.com/Siricee/hexo-theme-Chic" target="_blank">Chic</a></span>
    </div>
</footer>

    </div>
</body>

</html>